-
Notifications
You must be signed in to change notification settings - Fork 164
Reduce constants to NF before specialisation #3130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reduce constants to NF before specialisation #3130
Conversation
005a66e to
27fe4eb
Compare
martijnbastiaan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another day another hack..
| e2Red <- case collectArgs e2 of | ||
| (Prim p0, _) -> whnfRW False ctx e2 $ \_ctx1 e2Red -> case e2Red of | ||
| (collectArgs -> (Prim p1, _)) | primName p0 == primName p1 -> return e2 | ||
| _ -> changed e2Red | ||
| _ -> return e2 | ||
| specialize ctx (App e1 e2Red) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this should have a comment pointing to the bug report. I know that we can do code archaeology, but given that this is such a hack I think it deserves one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also done
| @@ -0,0 +1 @@ | |||
| FIXED: Reduce constants to NF before specialisation [#3129](https://github.com/clash-lang/clash-compiler/issues/3129) | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| FIXED: Reduce constants to NF before specialisation [#3129](https://github.com/clash-lang/clash-compiler/issues/3129) | |
| FIXED: Reduce constants to NF before specialization [#3129](https://github.com/clash-lang/clash-compiler/issues/3129) |
We settled on 🇺🇸 English
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
27fe4eb to
00e3653
Compare
|
I think you might have amended without mentioning files @rowanG077? |
00e3653 to
9f275d9
Compare
|
Ugggh that's what you get when you are too long in front of the computer. It's fixed now. |
Basically the implementation @christiaanb gave in #3129 with an added test in the testsuite.
Fixes #3129
Still TODO: